package lab02.test03;
import java.security.PublicKey;
import java.util.Scanner;
/**
 * Created by w on 2017/10/12.
 */
public class Student {
    //1.属性：计算机成绩、数学成绩、英语成绩

    float computerScore;
    float mathScore;
    float englishScore;

    public Student() {
    }

    public Student(float computerScore, float mathScore, float englishScore) {
        this.computerScore = computerScore;
        this.mathScore = mathScore;
        this.englishScore = englishScore;
    }


    public float getComputerScore() {
        return computerScore;
    }

    public void setComputerScore(float computerScore) {
        this.computerScore = computerScore;
    }

    public float getMathScore() {
        return mathScore;
    }

    public void setMathScore(float mathScore) {
        this.mathScore = mathScore;
    }

    public float getEnglishScore() {
        return englishScore;
    }

    public void setEnglishScore(float englishScore) {
        this.englishScore = englishScore;
    }


    //2.行为：求总分、平均分、最高分、最低分，并且可以输出一个学生的完整信息。
    float sum(float computerScore,float mathScore,float englishScore) {
        return computerScore + mathScore + englishScore;
    }

    float average(float computerScore,float mathScore,float englishScore) {
        return (computerScore + mathScore + englishScore) / 3;
    }

    void max(float computerScore,float mathScore,float englishScore) {
        float a;
        if (computerScore > mathScore) ;
        a = computerScore;
        if (computerScore < mathScore) ;
        a = mathScore;
        if (a > englishScore) ;
        System.out.println(a);
        if (a < englishScore) ;
        System.out.println(englishScore);
    }

    void mix(float computerScore,float mathScore,float englishScore) {
        float b;
        if (computerScore > mathScore) ;
        b = mathScore;
        if (computerScore < mathScore) ;
        b = computerScore;
        if (b > englishScore) ;
        System.out.println(englishScore);
        if (b < englishScore) ;
        System.out.println(b);

    }

    private float nextFloat() {
        return 0;
    }


    //3.构造函数
    //4.main函数


}
